/*******************************************************************************
 * Copyright (c) 2012 Daniele Parisi.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Contributors:
 *     Daniele Parisi
 *     neb.inf@gmail.com
 *     http://www.danieleparisi.com/
 ******************************************************************************/
package org.jxreport.core.views.text;

import java.util.LinkedList;
import java.util.List;

import org.jxreport.core.Table;
import org.jxreport.core.XMLValues;
import org.jxreport.core.views.ViewObject;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

public class BrView extends ViewObject {

	protected List<TextView> contents = new LinkedList<TextView>();

	public BrView(Element textElement, Table table){
		super(textElement, table);

		NodeList nl = textElement.getElementsByTagName(XMLValues.CONTENT);
		for(int i = 0 ; i < nl.getLength();i++) {
			Element el = (Element)nl.item(i);
			this.contents.add(new TextView(el, table));
		}
	}

	public List<TextView> getContents() {
		return contents;
	}

	public void setContents(List<TextView> contents) {
		this.contents = contents;
	}

}
